package site.lyweb.domain.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Objects;

/**
 * 
 * @TableName teacher
 */
@Data
public class TeacherCourse implements Serializable {

    @TableId
    private String id;

    private String teacherName;

    private Integer age;

    private String profession;

    private String courseName;

    private BigDecimal credits;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TeacherCourse that = (TeacherCourse) o;
        return Objects.equals(id, that.id) && Objects.equals(teacherName, that.teacherName) && Objects.equals(age, that.age) && Objects.equals(profession, that.profession) && Objects.equals(courseName, that.courseName) && Objects.equals(credits, that.credits);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, teacherName, age, profession, courseName, credits);
    }

    @Override
    public String toString() {
        return "TeacherCourse{" +
                "id='" + id + '\'' +
                ", teacherName='" + teacherName + '\'' +
                ", age=" + age +
                ", profession='" + profession + '\'' +
                ", courseName='" + courseName + '\'' +
                ", credits=" + credits +
                '}';
    }
}